Implement Firebase Auth UseUserAccessGroup for C++ SDK#1758
Closed
jonsimantov wants to merge 2 commits intomainfrom
Closed
Implement Firebase Auth UseUserAccessGroup for C++ SDK#1758jonsimantov wants to merge 2 commits intomainfrom
jonsimantov wants to merge 2 commits intomainfrom
Conversation
This commit adds the UseUserAccessGroup method to the Firebase C++ Auth SDK. This method is only functional on iOS and acts as a no-op stub on other platforms (Android, desktop). It wraps the [FIRAuth useUserAccessGroup:error:] Objective-C method on iOS, allowing C++ developers to specify a keychain access group for sharing authentication data between apps. Key changes: - Added UseUserAccessGroup to the public Auth class in auth.h. - Implemented the iOS-specific logic in auth_ios.mm. - Provided stub implementations in auth_stub.cc (for desktop) and auth_android.cc (for Android).
jonsimantov
commented
Jun 27, 2025
Contributor
Author
jonsimantov
left a comment
There was a problem hiding this comment.
Could you please add a very simple integration test case in auth/integration_test/src/integration_test.cc? You can run it on all platforms and just ensure that the method call doesn't crash, no need to check the error results.
| @@ -0,0 +1,35 @@ | |||
| // Copyright 2023 Google LLC | |||
Contributor
Author
There was a problem hiding this comment.
This file should not exist, please put the stub implementations in the Android and Desktop files that already exist.
|
|
||
| AUTH_RESULT_FN(Auth, CreateUserWithEmailAndPassword, AuthResult) | ||
|
|
||
| // Platform-specific implementation of UseUserAccessGroup. |
Contributor
Author
There was a problem hiding this comment.
Don't pu tthe platform-specific implementation here, put it in auth_android and auth_desktop and auth_ios.
| void InitializeTokenRefresher(AuthData* auth_data) {} | ||
| void DestroyTokenRefresher(AuthData* auth_data) {} | ||
|
|
||
| // Stub implementation for UseUserAccessGroupInternal on Android. |
Contributor
Author
There was a problem hiding this comment.
Desktop needs this too.
- Moved stub implementations from auth_stub.cc to auth_desktop.cc and auth_android.cc. - Removed auth_stub.cc. - Removed unnecessary forward declaration for UseUserAccessGroupInternal from auth.cc. - Added a basic integration test for UseUserAccessGroup to ensure it doesn't crash on any platform.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit adds the UseUserAccessGroup method to the Firebase C++ Auth SDK. This method is only functional on iOS and acts as a no-op stub on other platforms (Android, desktop).
It wraps the [FIRAuth useUserAccessGroup:error:] Objective-C method on iOS, allowing C++ developers to specify a keychain access group for sharing authentication data between apps.
Key changes:
Description
Testing
Type of Change
Place an
xthe applicable box:Notes
Release Notessection ofrelease_build_files/readme.md.